require("dotenv").config() //配置文件插件
//测试认证机制
var mqtt = require('mqtt')
var client = mqtt.connect(process.env.MQTT_URL, {
    username: "test",
    password: "123456"
})

client.on('connect', function (connack) {
    console.log(`return code: ${connack.returnCode}`)
    client.end()
})